#ifndef AGORA_C
# define AGORA_C


namespace AgoraClient
{

/*
** Defines
*/

#define ENCODER_NONE	0
#define ENCODER_SPEEX	1

#define ALFORMAT_MONO8		1
#define ALFORMAT_MONO16		2
#define ALFORMAT_STEREO8	3
#define ALFORMAT_STEREO16	4

#define FREQUENCE_NARROWBAND	8000
#define FREQUENCE_WIDEBAND		16000
#define FREQUENCE_ULTRAWIDEBAND	32000


#ifdef __cplusplus
extern "C" {
#endif

/*
** Factory
*/
void	*AgoraFactory_CreateAgora();
void	AgoraFactory_DeleteAgora(void *agora);
int		AgoraFactory_CreateDefaultMicrophone(void* agora, unsigned int frequence, unsigned int format);
void	AgoraFactory_CreateDefaultEncoder(void *agora, unsigned int quality, char encoderKey);
void	AgoraFactory_CreateDefaultAudioOut(void *agora);
void	AgoraFactory_CreateDefaultEmpacter(void *agora);
void	AgoraFactory_CreateDefaultClient(void *agora);
void	AgoraFactory_RemoveAudioInput(void *agora, int audioInKey);
void	AgoraFactory_RemoveEncoder(void *agora, char encoderKey);

/*
** Encoder
*/
void	AgoraEncoder_SetEncoderForAudioInput(void *agora, char encoderKey, int audioInputKey);
void	AgoraEncoder_SetEncoderQuality(void *agora, char encoderKey, unsigned int quality);

/*
** Debug
*/
int		AgoraDebug_GetLocalTest(void *agora);
void	AgoraDebug_SetLocalTest(void *agora, int boolValue);

/*
** Network
*/
int		AgoraNetwork_IsConnected(void *agora);
void	AgoraNetwork_Disconnect(void *agora);
int		AgoraNetwork_Connect(void *agora, char *address, int portTxtAdm, int portSound, char *login, char *pass);
unsigned int AgoraNetwork_GetUploadRate(void *agora);
unsigned int AgoraNetwork_GetDownloadRate(void *agora);

/*
** AudioInput
*/
void	AgoraAudioInput_StartAll(void *agora);
void	AgoraAudioInput_Start(void *agora, int audioInputKey);
void	AgoraAudioInput_StopAll(void *agora);
void	AgoraAudioInput_Stop(void *agora, int audioInputKey);

/*
** AudioOut
*/
void	AgoraAudioOut_Start(void *agora);
void	AgoraAudioOut_Stop(void *agora);

#ifdef __cplusplus
}
#endif


#endif